package servlet;

import bean.Seat;
import dao.SeatDaoImpl;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public class Manager_seatone extends HttpServlet {
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        doPost(req,resp);
    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        SeatDaoImpl st=new SeatDaoImpl();
        List<Seat> list=st.getAll();
        //跳转页面到前端
        req.setAttribute("seatlist",list);
        req.getRequestDispatcher("/Manager_seatone.jsp").forward(req,resp);
    }
}


